<?php
	$title = 'title_'.$this->lang;
	$description = 'description_'.$this->lang;
?>
<div id="right-800">
	<div class="box-h1">
		<h1 title="Search Books Result"><?=html::image('images/h1/'.$this->lang.'/yourcart.gif')?></h1>
		<div class="box1">
		<?php if(isset($carts['items']) and count($carts['items'])>0) { ?>
			<ul class="cart-list">
			<?php foreach($products as $product) { ?>
				<li>
					<div class="photo"><a href=""><?=html::image(($product->photo_ext != '') ? 'photo/product/140/210/'.$product->id.'.'.$product->photo_ext : 'photo/product/140/210/nocover.jpg')?></a></div>
					<div class="info">
						<h3><?=$product->$title?></h3>
						<h5><?=$product->$description?></h5>
						<p>$<?=$product->price*1?> x <input type="text" id="book<?=$product->id?>" value="<?=$carts['items'][$product->id]['quantities']?>"/> = $<?=$product->price*$carts['items'][$product->id]['quantities']?></p>
						<p><a onclick="window.location='<?=url::base()?>cart/quantity/'+<?=$product->id?>+'/'+$('book'+<?=$product->id?>).value;">Change quantity</a>&#160;&#160;&#160;&#160;<?=html::anchor('cart/delete/'.$product->id, 'Delete item')?></p>
					</div>
				</li>
			<?php } ?>
				<li>
					<div class="total">
						<p><em>Subtotal:</em>$<?=$carts['subtotal']?></p>
						<p><em>Shipping:</em>$0</p>
						<p class="sum"><em>TOTAL:</em>$<?=$carts['subtotal']?></p>
					</div>
				</li>
			</ul>
		<?php } else { ?>
			Your shopping cart is empty!
		<?php } ?>	
			<div style="clear:both;text-align:right;"><?=html::anchor('cart/checkout/genorder', 'Checkout')?></div>
		</div>
	</div>
</div>